const state = {
  number: 1000
}

const mutations = {
  addNumber (state, num) {
    state.number += num
  }
}

const actions = {
  addNumberAction (context, num) {
    setTimeout(() => {
      context.commit('addNumber', num)
    }, 2000)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
